package com.xiaobai.netease_news.model;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Android Studio
 * Project: Netease_News
 * Author: Jack
 * Email: jackfangqi1314@gmail.com/jackfangqi@163.com
 * Date: 2015/6/26
 */
public class HeadAD {
    private String title;
    private String tag;
    private String subtitle;
    private String imgsrc;
    private String url;

    public String getImgsrc() {
        return imgsrc;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public String getTag() {
        return tag;
    }

    public String getTitle() {
        return title;
    }

    public String getUrl() {
        return url;
    }

    public void parseJson(JSONObject jsonObject) {
        if (jsonObject != null) {
            try {
                title = jsonObject.getString("title");
                tag = jsonObject.getString("tag");
                subtitle = jsonObject.getString("subtitle");
                imgsrc = jsonObject.getString("imgsrc");
                url = jsonObject.getString("url");
            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
    }
}
